/**
 * @CreateTime:2020年6月5日下午1:48:49;
 * @User:Administrator;
 * @ProjectName:ybj;
 * @ClassName:Application;
 * @Author:YangBingJie;
 * @QQ:2284180138;
 * @Email:2284180138@qq.com;
 **/
package xyz.yangbingjie.java;

import java.util.Arrays;
import java.util.concurrent.ThreadLocalRandom;

import xyz.yangbingjie.java.entity.Employee;

public class Application {

	public static void main(String[] args) {
		Employee[] e = new Employee[5];
		System.out.println(e.length+">>>>>>>>>>>>");
		for (int i = 1; i <= e.length; i++) {
			e[i-1] = new Employee();
			e[i-1].setId(String.valueOf("42032319917656465"+(e.length-i)));
			e[i-1].setName("杨冰洁"+i+"号");
			e[i-1].setSex("女");
			e[i-1].setSalary(ThreadLocalRandom.current().nextInt(100000));
			e[i-1].setCorp("java开发"+i+"部");
		}
		
		Arrays.sort(e);
		for (Employee employee : e) {
			System.out.println("身份证号:"+employee.getId());
			System.out.println("姓名:"+employee.getName());
			System.out.println("性别:"+employee.getSex());
			System.out.println("工资:"+employee.getSalary());
			System.out.println("部门:"+employee.getCorp());
			System.out.println("=======================");
		}
	}

}
